<template>
  
    <table class="my-table">
      <thead>
        <tr>
          <slot name="header"></slot>
        </tr>
      </thead>
      <tbody>
        <tr v-for="item in data" :key="item.id">
           <slot :item="item" name="content"></slot>
        </tr>
       
      </tbody>
    </table>
  
</template>

<script>
import MyTag  from  './MyTag.vue'
export default {
  name: 'Vue05MyTable',
  //注册
components:{
  MyTag
},
props:{
  data:{
type:Array,
required:true
  }
},
  data() {
    return {
      
    };
  },

  mounted() {
    
  },

  methods: {
    
  },
};
</script>

<style lang="scss" scoped>

</style>